//防抖函数
const debounce = (fun: Function, timer: number, skuNum: number) => {
  let time: any;
  let oldnum = skuNum;
  return function (...arg: any) {
    clearTimeout(time);
    setTimeout(() => {
      fun.apply(null, arg);
    }, timer);
  };
};

export default debounce;
